/*   1:    */ package com.atomikos.icatch.imp;
/*   2:    */ 
/*   3:    */ import com.atomikos.icatch.admin.AdminTransaction;
/*   4:    */ import com.atomikos.icatch.admin.LogControl;
/*   5:    */ import java.util.Enumeration;
/*   6:    */ import java.util.Hashtable;
/*   7:    */ import java.util.Vector;
/*   8:    */ 
/*   9:    */ class LogControlImp
/*  10:    */   implements LogControl
/*  11:    */ {
/*  12:    */   private TransactionServiceImp service_;
/*  13:    */   
/*  14:    */   LogControlImp(TransactionServiceImp service)
/*  15:    */   {
/*  16: 54 */     this.service_ = service;
/*  17:    */   }
/*  18:    */   
/*  19:    */   public AdminTransaction[] getAdminTransactions()
/*  20:    */   {
/*  21: 63 */     AdminTransaction[] ret = null;
/*  22: 64 */     AdminTransaction[] template = new AdminTransaction[0];
/*  23: 65 */     Vector vect = new Vector();
/*  24: 66 */     Enumeration enumm = this.service_.getCoordinatorImpVector().elements();
/*  25: 67 */     while (enumm.hasMoreElements())
/*  26:    */     {
/*  27: 68 */       CoordinatorImp c = (CoordinatorImp)enumm.nextElement();
/*  28: 69 */       AdminTransaction tx = new AdminTransactionImp(c);
/*  29: 70 */       vect.addElement(tx);
/*  30:    */     }
/*  31: 72 */     ret = (AdminTransaction[])vect.toArray(template);
/*  32:    */     
/*  33: 74 */     return ret;
/*  34:    */   }
/*  35:    */   
/*  36:    */   public AdminTransaction[] getAdminTransactions(String[] tids)
/*  37:    */   {
/*  38: 83 */     AdminTransaction[] ret = null;
/*  39: 84 */     AdminTransaction[] temp = new AdminTransaction[0];
/*  40: 85 */     Vector vect = new Vector();
/*  41:    */     
/*  42: 87 */     Hashtable filter = new Hashtable();
/*  43: 88 */     for (int i = 0; i < tids.length; i++) {
/*  44: 89 */       filter.put(tids[i], tids[i]);
/*  45:    */     }
/*  46: 92 */     Enumeration enumm = this.service_.getCoordinatorImpVector().elements();
/*  47: 93 */     while (enumm.hasMoreElements())
/*  48:    */     {
/*  49: 94 */       CoordinatorImp c = (CoordinatorImp)enumm.nextElement();
/*  50: 95 */       if (filter.containsKey(c.getCoordinatorId()))
/*  51:    */       {
/*  52: 96 */         AdminTransaction tx = new AdminTransactionImp(c);
/*  53: 97 */         vect.addElement(tx);
/*  54:    */       }
/*  55:    */     }
/*  56:100 */     ret = (AdminTransaction[])vect.toArray(temp);
/*  57:    */     
/*  58:102 */     return ret;
/*  59:    */   }
/*  60:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\transactions\3.7.0\transactions-3.7.0.jar
 * Qualified Name:     com.atomikos.icatch.imp.LogControlImp
 * JD-Core Version:    0.7.0.1
 */